package server.container;

import server.*;

public class Wrapper implements Valve, Lifecycle {
    private String url;
    private Servlet servlet;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setServlet(Servlet servlet) {
        this.servlet = servlet;
    }

    @Override
    public void invoke(Request request, Response response) {
        try {
            servlet.service(request,response);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void start() {

    }
}
